package com.learn.designPatterns.structuralType.Composite;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-10-29 15:01
 */
public abstract class Component {

    protected String name;

    public Component(String name) {
        this.name = name;
    }

    public void print() {
        print(0);
    }

    abstract void print(int level);
    abstract void add(Component component);
    abstract void remove(Component component);
}
